package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Account  string `gorm:"type:varchar(20)" json:"account"`
	Password string `gorm:"type:varchar(32)" json:"password"`
	NickName string `gorm:"type:varchar(20)" json:"nickName"`
	Image    string `gorm:"type:varchar(500)" json:"image"`
}
type Novel struct {
	gorm.Model
	UserId   int    `gorm:"type:int" json:"userId"`
	Title    string `gorm:"type:varchar(20)" json:"title"`
	Category string `gorm:"type:varchar(20)" json:"category"`
	Info     string `gorm:"type:varchar(50)" json:"info"`
	Refer    string `gorm:"type:varchar(100)" json:"refer"`
	Image    string `gorm:"type:varchar(500)" json:"image"`
}
type Content struct {
	gorm.Model
	UserId  int    `gorm:"type:int" json:"userId"`
	NovelId int    `gorm:"type:int" json:"novelId"`
	Context string `gorm:"type:varchar(50)" json:"context"`
}
type Collect struct {
	gorm.Model
	UserId  int `gorm:"type:int" json:"userId"`
	NovelId int `gorm:"type:int" json:"novelId"`
}
type CollectList struct {
	Collect
	Title    string
	Category string
	Info     string
	Refer    string
	Image    string
}
type ContentList struct {
	Content
	NickName string
	Title    string
	Refer    string
}
